<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html >
<html>
<head>
<title>eap</title>
<t:base type="jquery,easyui,tools,DatePicker,autocomplete,bootsprap,layer"></t:base>
<link rel="shortcut icon" href="eap/sys/image/login/explink.ico">
<style type="text/css">
.navbar {
	margin: 0px -2px 0px -2px;
}

.brand {
	text-overflow: ellipsis;
	white-space: nowrap;
}

.brand div {
	float: left;
	padding-right: 10px;
}

.brand h2 {
	font-size: 18px;
	margin-top: 20px;
}

.brand small {
	font-weight: normal;
}

.brand label {
	font-weight: bold;
}
</style>
<SCRIPT type="text/javascript">
	$(function() {
		$('#layout_jeecg_onlineDatagrid')
				.datagrid(
						{
							url : 'systemController.do?datagridOnline&field=ip,logindatetime,user.userName,',
							title : '',
							iconCls : '',
							fit : true,
							fitColumns : true,
							pagination : true,
							pageSize : 10,
							pageList : [ 10 ],
							nowarp : false,
							border : false,
							idField : 'id',
							sortName : 'logindatetime',
							sortOrder : 'desc',
							frozenColumns : [ [ {
								title : '编号',
								field : 'id',
								width : 150,
								hidden : true
							} ] ],
							columns : [ [
									{
										title : '登录名',
										field : 'user.userName',
										width : 100,
										align : 'center',
										sortable : true,
										formatter : function(value, rowData,
												rowIndex) {
											return formatString(
													'<span title="{0}">{1}</span>',
													value, value);
										}
									},
									{
										title : 'IP',
										field : 'ip',
										width : 150,
										align : 'center',
										sortable : true,
										formatter : function(value, rowData,
												rowIndex) {
											return formatString(
													'<span title="{0}">{1}</span>',
													value, value);
										}
									},
									{
										title : '登录时间',
										field : 'logindatetime',
										width : 150,
										sortable : true,
										formatter : function(value, rowData,
												rowIndex) {
											return formatString(
													'<span title="{0}">{1}</span>',
													value, value);
										},
										hidden : true
									} ] ],
							onClickRow : function(rowIndex, rowData) {
							},
							onLoadSuccess : function(data) {
								$('#layout_jeecg_onlinePanel')
										.panel('setTitle',
												'( ' + data.total + ' )人在线');
							},
							onLoadError : function(data) {
							}
						}).datagrid('getPager').pagination({
					showPageList : false,
					showRefresh : false,
					beforePageText : '',
					afterPageText : '/{pages}',
					displayMsg : ''
				});

		$('#layout_jeecg_onlinePanel').panel({
			tools : [ {
				iconCls : 'icon-reload',
				handler : function() {
					$('#layout_jeecg_onlineDatagrid').datagrid('load', {});
				}
			} ]
		});

		$('#layout_east_calendar').calendar({
			fit : true,
			current : new Date(),
			border : false,
			onSelect : function(date) {
				$(this).calendar('moveTo', new Date());
			}
		});
		$(".layout-expand")
				.click(
						function() {
							$('#layout_east_calendar').css("width", "auto");
							$('#layout_east_calendar').parent().css("width",
									"auto");
							$("#layout_jeecg_onlinePanel").find(
									".datagrid-view")
									.css("max-height", "200px");
							$(
									"#layout_jeecg_onlinePanel .datagrid-view .datagrid-view2 .datagrid-body")
									.css("max-height", "180px").css(
											"overflow-y", "auto");
						});
		modifyMainTopDiv();
	});
	var onlineInterval;

	function easyPanelCollapase() {
		window.clearTimeout(onlineInterval);
	}
	function easyPanelExpand() {
		onlineInterval = window.setInterval(function() {
			$('#layout_jeecg_onlineDatagrid').datagrid('load', {});
		}, 1000 * 20);
	}

	function modifyMainTopDiv() {
		jQuery("div[id='main_top_div']").prev().remove();
		jQuery("div[id='main_top_div']").css({
			"height" : "80px"
		});
	}
</SCRIPT>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
	<!-- 顶部-->
	<div region="north" border="false" id="main_top_div" title="eap2"
		style="height: 80px; overflow: hidden;">
		<div class="navbar" id="main_top_container">
			<div class="navbar-inner">
				<div class="container">
					<div class="brand">
						<div>
							<img src="eap/sys/image/login/pylogo.png" alt=""
								style="height: 70px;">
						</div>
						<div>
							<h2>
								<label style="font-size: 1em;">到啦配送管理平台</label>
							</h2>
						</div>
					</div>
					<div class="pull-right"
						style="text-align: right; margin-top: 30px;">
						<div>
							<label> <i class="icon-user" title="当前用户"></i>：<span
								style="font-weight: bold;">${userName }</span><span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>
								<i class="icon-briefcase" title="职务"></i>：<span
								style="font-weight: bold;">${roleName}</span>
							</label>
						</div>
						<div>
							<a href="javascript:void(0);" class="easyui-menubutton"
								menu="#layout_north_kzmbMenu"><i class="icon-th"></i>控制面板</a> <a
								href="javascript:void(0);" class="easyui-menubutton"
								menu="#layout_north_zxMenu"><i class="icon-share-alt"></i>注销</a>
						</div>
						<div id="layout_north_kzmbMenu"
							style="width: 100px; display: none;">
							<div onclick="openwindow('用户信息','userController.do?userinfo')">
								<i class="icon-user" style="position: relative; left: -25px;"></i>个人信息
							</div>
							<div class="menu-sep"></div>
							<div onclick="add('修改密码','userController.do?changepassword')">
								<i class="icon-lock" style="position: relative; left: -25px;"></i>修改密码
							</div>
							<div class="menu-sep"></div>
							<div onclick="add('修改首页风格','userController.do?changestyle')">
								<i class="icon-home" style="position: relative; left: -25px;"></i>首页风格
							</div>
						</div>
						<div id="layout_north_zxMenu" style="width: 100px; display: none;">
							<div onclick="exit('loginController.do?logout','确定退出该系统吗 ?',1);">
								<i class="icon-off" style="position: relative; left: -25px;"></i>退出系统
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 左侧-->
	<div region="west" split="true" href="loginController.do?left"
		title="导航菜单" style="width: 150px; padding: 1px;"></div>
	<!-- 中间-->
	<div id="mainPanle" region="center" style="overflow: hidden;">
		<div id="maintabs" class="easyui-tabs" fit="true" border="false">
			<div class="easyui-tab" title="首页" href="loginController.do?home"
				style="padding: 2px; overflow-y: initial;"></div>
			<c:if test="${map=='1'}">
				<div class="easyui-tab" title="地图"
					style="padding: 1px; overflow: hidden;">
					<iframe name="myMap" id="myMap" scrolling="no" frameborder="0"
						src="mapController.do?map" style="width: 100%; height: 99.5%;"></iframe>
				</div>
			</c:if>
		</div>
	</div>
	<!-- 右侧 -->
	<div collapsed="true" region="east" iconCls="icon-reload" title="辅助工具"
		split="true" style="width: 190px;"
		data-options="onCollapse:function(){easyPanelCollapase()},onExpand:function(){easyPanelExpand()}">
		<div id="tabs" class="easyui-tabs" border="false"
			style="height: 240px">
			<div title="日历" style="padding: 0px; overflow: hidden; color: red;">
				<div id="layout_east_calendar"></div>
			</div>
		</div>
		<div id="layout_jeecg_onlinePanel"
			data-options="fit:true,border:false" title="用户在线列表">
			<table id="layout_jeecg_onlineDatagrid"></table>
		</div>
		<!-- 底部 -->
		<div region="south" border="false"
			style="height: 25px; overflow: hidden;">
			<div align="center" style="color: #CC99FF; padding-top: 2px">
				&copy; 版权所有 <span class="tip"><a href="http://www.explink.cn"
					title=" eap1.0"> eap1.0</a>
					(推荐谷歌浏览器，获得更快响应速度) 技术支持:<a href="#"
					title=" eap1.0">eap1.0</a> </span>
			</div>
		</div>
		<div id="mm" class="easyui-menu" style="width: 150px;">
			<div id="mm-tabupdate">刷新</div>
			<div id="mm-tabclose">关闭</div>
			<div id="mm-tabcloseall">全部关闭</div>
			<div id="mm-tabcloseother">除此之外全部关闭</div>
			<div class="menu-sep"></div>
			<div id="mm-tabcloseright">当前页右侧全部关闭</div>
			<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
		</div>
	</div>
</body>
</html>